2025-03-23 15:23:10,925 - INFO - Num classes: 3
2025-03-23 15:28:40,428 - INFO - Class weights: tensor([0.5455, 2.7088, 1.2537], device='cuda:0')
2025-03-23 15:28:40,475 - INFO - Model architecture:
CombinedModel(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1080, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(3, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(3, 3, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1080, out_features=67, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=67, out_features=1080, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1080, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=3, bias=True)
    )
    (logistic): Linear(in_features=3, out_features=3, bias=True)
  )
  (mlp): Sequential(
    (0): Linear(in_features=6, out_features=256, bias=True)
    (1): ReLU(inplace=True)
    (2): BatchNorm1d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout(p=0.2, inplace=False)
    (4): Linear(in_features=256, out_features=128, bias=True)
    (5): ReLU(inplace=True)
    (6): BatchNorm1d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout(p=0.2, inplace=False)
    (8): Linear(in_features=128, out_features=3, bias=True)
  )
)
2025-03-23 15:28:40,475 - INFO - Using cuda device
2025-03-23 15:37:32,646 - INFO - Epoch: 0/100. Training time: 354.469
2025-03-23 15:37:32,648 - INFO - Training Metrics...
2025-03-23 15:37:32,649 - INFO - {'loss': 0.8284547784525877, 'f1': 57.067081326412925, 'acc': 61.23282986562458, 'precision': 60.686719487077276, 'recall': 63.55850423747381, 'balanced acc': 63.55850423747381}
2025-03-23 15:37:32,649 - INFO - Validation Metrics... Inference time: 177.696
2025-03-23 15:37:32,649 - INFO - {'loss': 0.6202895228679364, 'f1': 71.47060263904861, 'acc': 81.86578116823652, 'precision': 72.19234644200833, 'recall': 79.66608533535202, 'balanced acc': 79.66608533535202}
2025-03-23 15:37:32,649 - INFO - ==================================================
2025-03-23 16:21:23,836 - INFO - Epoch: 5/100. Training time: 350.977
2025-03-23 16:21:23,838 - INFO - Training Metrics...
2025-03-23 16:21:23,838 - INFO - {'loss': 0.5734787142960129, 'f1': 71.2474035355689, 'acc': 77.81670938678019, 'precision': 70.85515296459167, 'recall': 78.44665739372641, 'balanced acc': 78.44665739372641}
2025-03-23 16:21:23,838 - INFO - Validation Metrics... Inference time: 177.284
2025-03-23 16:21:23,839 - INFO - {'loss': 0.45010830805851865, 'f1': 74.81005754153178, 'acc': 84.95235233516483, 'precision': 73.5043949330982, 'recall': 79.8707964017131, 'balanced acc': 79.8707964017131}
2025-03-23 16:21:23,839 - INFO - ==================================================
2025-03-23 17:05:06,071 - INFO - Epoch: 10/100. Training time: 345.981
2025-03-23 17:05:06,073 - INFO - Training Metrics...
2025-03-23 17:05:06,074 - INFO - {'loss': 0.6388396328421915, 'f1': 68.18829146095173, 'acc': 76.18316011715194, 'precision': 68.40090246525583, 'recall': 76.03047734810265, 'balanced acc': 76.03047734810265}
2025-03-23 17:05:06,074 - INFO - Validation Metrics... Inference time: 176.690
2025-03-23 17:05:06,074 - INFO - {'loss': 0.46433424949645996, 'f1': 74.91691953103654, 'acc': 85.42085704474098, 'precision': 74.42404699173463, 'recall': 78.03947224524507, 'balanced acc': 78.03947224524507}
2025-03-23 17:05:06,074 - INFO - ==================================================
2025-03-23 17:48:56,286 - INFO - Epoch: 15/100. Training time: 352.468
2025-03-23 17:48:56,288 - INFO - Training Metrics...
2025-03-23 17:48:56,288 - INFO - {'loss': 0.6395039222422679, 'f1': 67.60540735922382, 'acc': 74.79443061062004, 'precision': 67.3079685786291, 'recall': 74.54321807290404, 'balanced acc': 74.54321807290404}
2025-03-23 17:48:56,288 - INFO - Validation Metrics... Inference time: 179.405
2025-03-23 17:48:56,288 - INFO - {'loss': 0.459368687409621, 'f1': 74.33026611051132, 'acc': 84.37924148024595, 'precision': 73.15696862035217, 'recall': 79.56134912685677, 'balanced acc': 79.56134912685677}
2025-03-23 17:48:56,288 - INFO - ==================================================
2025-03-23 18:33:24,368 - INFO - Epoch: 20/100. Training time: 357.611
2025-03-23 18:33:24,370 - INFO - Training Metrics...
2025-03-23 18:33:24,371 - INFO - {'loss': 0.5773991323580407, 'f1': 71.58728021777583, 'acc': 77.14224274502796, 'precision': 71.15919775880405, 'recall': 77.74373517411804, 'balanced acc': 77.74373517411804}
2025-03-23 18:33:24,371 - INFO - Validation Metrics... Inference time: 176.491
2025-03-23 18:33:24,371 - INFO - {'loss': 0.44780376859200305, 'f1': 74.43982744105722, 'acc': 84.3118632669414, 'precision': 73.19439206577253, 'recall': 79.87609753589359, 'balanced acc': 79.87609753589359}
2025-03-23 18:33:24,371 - INFO - ==================================================
2025-03-23 19:17:23,970 - INFO - Epoch: 25/100. Training time: 347.886
2025-03-23 19:17:23,973 - INFO - Training Metrics...
2025-03-23 19:17:23,973 - INFO - {'loss': 0.6044119326931656, 'f1': 70.11021192764825, 'acc': 76.12461460499806, 'precision': 69.0580682018705, 'recall': 77.36492222804841, 'balanced acc': 77.36492222804841}
2025-03-23 19:17:23,973 - INFO - Validation Metrics... Inference time: 176.537
2025-03-23 19:17:23,973 - INFO - {'loss': 0.4217649270326663, 'f1': 75.54333233686094, 'acc': 85.71201166764783, 'precision': 74.3769493665567, 'recall': 79.59107494623878, 'balanced acc': 79.59107494623878}
2025-03-23 19:17:23,973 - INFO - ==================================================
2025-03-23 20:01:32,091 - INFO - Epoch: 30/100. Training time: 350.010
2025-03-23 20:01:32,093 - INFO - Training Metrics...
2025-03-23 20:01:32,094 - INFO - {'loss': 0.6497196205862009, 'f1': 66.15748804605714, 'acc': 73.02823995840374, 'precision': 65.93809506921592, 'recall': 74.8853617639886, 'balanced acc': 74.8853617639886}
2025-03-23 20:01:32,094 - INFO - Validation Metrics... Inference time: 178.711
2025-03-23 20:01:32,094 - INFO - {'loss': 0.4363021453221639, 'f1': 74.8644383899416, 'acc': 85.00999558477238, 'precision': 73.79701921694178, 'recall': 79.3804672114135, 'balanced acc': 79.3804672114135}
2025-03-23 20:01:32,094 - INFO - ==================================================
2025-03-23 20:45:49,023 - INFO - Epoch: 35/100. Training time: 352.524
2025-03-23 20:45:49,026 - INFO - Training Metrics...
2025-03-23 20:45:49,026 - INFO - {'loss': 0.587712123895147, 'f1': 70.91953594678795, 'acc': 78.1747484523268, 'precision': 70.80186598607503, 'recall': 76.50561977031006, 'balanced acc': 76.50561977031006}
2025-03-23 20:45:49,026 - INFO - Validation Metrics... Inference time: 180.507
2025-03-23 20:45:49,026 - INFO - {'loss': 0.43195913158930266, 'f1': 74.68484525303647, 'acc': 84.7519807201727, 'precision': 73.71589242747147, 'recall': 79.60493439694994, 'balanced acc': 79.60493439694994}
2025-03-23 20:45:49,026 - INFO - ==================================================
2025-03-23 21:30:28,051 - INFO - Epoch: 40/100. Training time: 358.559
2025-03-23 21:30:28,053 - INFO - Training Metrics...
2025-03-23 21:30:28,054 - INFO - {'loss': 0.5799731122460335, 'f1': 71.27364140872683, 'acc': 78.24229413102822, 'precision': 71.28861921283371, 'recall': 78.14197554216855, 'balanced acc': 78.14197554216855}
2025-03-23 21:30:28,054 - INFO - Validation Metrics... Inference time: 181.665
2025-03-23 21:30:28,054 - INFO - {'loss': 0.4205419925542978, 'f1': 75.23607466063493, 'acc': 85.60173318125325, 'precision': 74.24353212255129, 'recall': 79.1112446814185, 'balanced acc': 79.1112446814185}
2025-03-23 21:30:28,054 - INFO - ==================================================
2025-03-23 22:15:24,231 - INFO - Epoch: 45/100. Training time: 352.279
2025-03-23 22:15:24,233 - INFO - Training Metrics...
2025-03-23 22:15:24,234 - INFO - {'loss': 0.5722754514141447, 'f1': 72.06082033423444, 'acc': 77.86234492801898, 'precision': 71.33894732238642, 'recall': 78.17199781657489, 'balanced acc': 78.17199781657489}
2025-03-23 22:15:24,234 - INFO - Validation Metrics... Inference time: 178.169
2025-03-23 22:15:24,234 - INFO - {'loss': 0.40632465405341905, 'f1': 75.21398503058772, 'acc': 85.47998225732601, 'precision': 74.41626291021655, 'recall': 79.10818157583651, 'balanced acc': 79.10818157583651}
2025-03-23 22:15:24,234 - INFO - ==================================================
2025-03-23 22:59:32,072 - INFO - Epoch: 50/100. Training time: 348.758
2025-03-23 22:59:32,075 - INFO - Training Metrics...
2025-03-23 22:59:32,075 - INFO - {'loss': 0.6338765218759038, 'f1': 70.13718089997356, 'acc': 76.59464163850254, 'precision': 69.6720621621709, 'recall': 75.2096436367663, 'balanced acc': 75.2096436367663}
2025-03-23 22:59:32,075 - INFO - Validation Metrics... Inference time: 181.302
2025-03-23 22:59:32,076 - INFO - {'loss': 0.4291343635473496, 'f1': 74.95635722781066, 'acc': 85.14457315378074, 'precision': 73.85918206412809, 'recall': 79.29236656898489, 'balanced acc': 79.29236656898489}
2025-03-23 22:59:32,076 - INFO - ==================================================
2025-03-23 23:44:19,906 - INFO - Epoch: 55/100. Training time: 357.563
2025-03-23 23:44:19,909 - INFO - Training Metrics...
2025-03-23 23:44:19,909 - INFO - {'loss': 0.5746161687146326, 'f1': 71.64527785839554, 'acc': 77.48516305407513, 'precision': 71.08852754146163, 'recall': 77.20648793624947, 'balanced acc': 77.20648793624947}
2025-03-23 23:44:19,909 - INFO - Validation Metrics... Inference time: 183.374
2025-03-23 23:44:19,909 - INFO - {'loss': 0.4283971977539552, 'f1': 74.64244020849623, 'acc': 84.78279532967034, 'precision': 73.62464586477353, 'recall': 79.35967965233944, 'balanced acc': 79.35967965233944}
2025-03-23 23:44:19,910 - INFO - ==================================================
2025-03-24 00:29:00,908 - INFO - Epoch: 60/100. Training time: 356.254
2025-03-24 00:29:00,910 - INFO - Training Metrics...
2025-03-24 00:29:00,911 - INFO - {'loss': 0.5264759120667816, 'f1': 73.02015819771356, 'acc': 78.95472903532432, 'precision': 72.17759498075077, 'recall': 79.70238018505106, 'balanced acc': 79.70238018505106}
2025-03-24 00:29:00,911 - INFO - Validation Metrics... Inference time: 177.535
2025-03-24 00:29:00,911 - INFO - {'loss': 0.41307780375847447, 'f1': 74.95749136244353, 'acc': 85.17638425562532, 'precision': 74.05548937836599, 'recall': 79.40255035873575, 'balanced acc': 79.40255035873575}
2025-03-24 00:29:00,912 - INFO - ==================================================
2025-03-24 00:46:44,771 - INFO - Early stopping criterion met. Stopping training.
2025-03-24 00:46:45,590 - INFO - Initializing final Evaluations:

2025-03-24 00:49:44,718 - INFO - Final validation metrics:
{'f1': 76.36850883511514, 'acc': 86.48368001046572, 'precision': 74.67282462082598, 'recall': 79.27088188537654, 'balanced acc': 79.27088188537654}
2025-03-24 00:51:54,309 - INFO - Final test pixel-wise classification metrics:
{'f1': 78.0627912253267, 'acc': 81.1878896157104, 'precision': 77.72184082163884, 'recall': 80.4101636552415, 'balanced acc': 80.4101636552415}
2025-04-05 02:28:42,209 - INFO - Num classes: 3
2025-04-05 02:28:42,212 - INFO - Class weights: None
2025-04-05 02:28:42,389 - INFO - Model architecture:
CombinedModel(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1080, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(3, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(3, 3, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1080, out_features=67, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=67, out_features=1080, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1080, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=3, bias=True)
    )
    (logistic): Linear(in_features=3, out_features=3, bias=True)
  )
  (mlp): Sequential(
    (0): Linear(in_features=6, out_features=256, bias=True)
    (1): ReLU(inplace=True)
    (2): BatchNorm1d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout(p=0.2, inplace=False)
    (4): Linear(in_features=256, out_features=128, bias=True)
    (5): ReLU(inplace=True)
    (6): BatchNorm1d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout(p=0.2, inplace=False)
    (8): Linear(in_features=128, out_features=3, bias=True)
  )
)
2025-04-05 02:28:42,389 - INFO - Using cuda device
2025-04-05 02:28:42,412 - INFO - Initializing final Evaluations:

